// 引入 网络请求模块
import request from '@/utils/request.js'

// 按需导出相关API接口

// 获取推荐歌单
export const recommendSongListAPI = ({limit}) => request({
    url: '/personalized',
    params: {
        limit
    }
})

// 推荐新音乐歌单
export const recommendNewListAPI = ({limit}) => request({
    url: '/personalized/newsong',
    params: {
        limit: limit || 10
    }
})

// 热搜列表(简略)
export const searchHotListAPI = () => request({
    url: '/search/hot'
})

// 搜索音乐
export const searchResultAPI = (params) => request({
    url: '/cloudsearch',
    params: params
})

// 播放页 - 获取歌曲详情
export const getSongByIdAPI = (id) => request({
    url: `/song/detail?ids=${id}`,
    method: "GET"
})
  
// 播放页 - 获取歌词
export const getLyricByIdAPI = (id) => request({
url: `/lyric?id=${id}`,
method: "GET"
})